precision highp float;

uniform float u_step_u;
uniform float u_step_v;
uniform float u_step_ratio;

attribute vec4 a_position;
attribute vec2 a_texcoord0;

varying highp vec2 v_uv[9];


void main () {
    vec4 ds = vec4(u_step_u, u_step_v, 0.0, -u_step_v) * u_step_ratio;

    v_uv[0] = a_texcoord0;
    v_uv[1] = a_texcoord0 - ds.xy;
    v_uv[2] = a_texcoord0 + ds.xy;
    v_uv[3] = a_texcoord0 - ds.xz;
    v_uv[4] = a_texcoord0 + ds.xz;
    v_uv[5] = a_texcoord0 - ds.xw;
    v_uv[6] = a_texcoord0 + ds.xw;
    v_uv[7] = a_texcoord0 - ds.zy;
    v_uv[8] = a_texcoord0 + ds.zy;

    gl_Position = a_position;
}